Skip to content

PLAT-1428 Removed unused cache_relation function - #16752

Merged
jmbowman merged 1 commit into
masterfrom
jmbowman/PLAT-1428
Dec 4, 2017
Merged

PLAT-1428 Removed unused cache_relation function#16752
jmbowman merged 1 commit into
masterfrom
jmbowman/PLAT-1428

Conversation

@jmbowman

@jmbowman jmbowman commented Dec 1, 2017

Copy link
Copy Markdown
Contributor

Fun story on this one. I looked to see if the new ForeignObjectRel class had all of the fields we were using from the old RelatedObject one, but parent_model has been renamed to related_model. But then I noticed that Django has been returning the new object as the related attribute since 1.8. The reason this didn't break anything for us is because...we don't use this module at all.

It was copied into edx-platform along with the rest of the django-cache-toolbox package (which was added primarily for its cached authentication middleware, which we still use). An attempt was made to use cache_relation on profile objects, but this was disabled within 2 weeks becase "we ran into issues"

Nevertheless, the relation.py module lived on. In the 5 years and 9 months since then, the cache_toolbox directory moved from the root of edx-platform to lib, then lms/lib, then common/lib, then common/djangoapps, then openedx/core/djangoapps. It was also cleansed of PEP 8 violations and had its imports reordered to satisfy isort.

Although the original django-cache-toolbox repo has been unmaintained for years, there is a somewhat active fork still making releases to PyPI which has actually adapted to the field rename. But I think we can just let go of this module until we actually have a need for it again.

@jmbowman
jmbowman merged commit fefdbef into master Dec 4, 2017
@jmbowman
jmbowman deleted the jmbowman/PLAT-1428 branch December 4, 2017 15:34
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Tuesday, December 05, 2017.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants